UpdateMovieResource
TheUpdateMovieResource
function replaces the contents of a movie resource in a specified movie file. You specify the movie that is to be placed into the resource.This function can accommodate single-fork movie files.
pascal OSErr UpdateMovieResource (Movie theMovie, short resRefNum, short resId, const StringPtr resName);
theMovie
- Specifies the movie you wish to place in the movie file. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).resRefNum
- Identifies the movie file that contains the resource to be changed. Your application obtains this value from the
OpenMovieFile
function, described on page 2-86. If this parameter specifies a single-fork movie file using themovieInDataForResID(-1)
constant, the Movie Toolbox places the movie resource into the file's data fork.resId
- Specifies the resource to be changed.
resName
- Points to a new name for the resource. If you do not want to change the resource's name, set this parameter to
nil
.DESCRIPTION
After updating the movie file, theUpdateMovieResource
function clears the movie changed flag, indicating that the movie has not been changed.ERROR CODES
File Manager errors
invalidMovie -2010 This movie is corrupted or invalid
Memory Manager errors
Resource Manager errors